home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 4.2 / arexx / editor / oz / 62-set-stills < prev    next >
Text File  |  1998-04-16  |  3KB  |  107 lines

  1. /* Set Stills v1.3 - sets a series of FRAMESTORES or VIDEO STILLS to a preset timing.  Operates from selected still through to STOP icon, or End of Project.  */
  2.  
  3.  
  4. /* By Aussie - ©1995 Michael Holten
  5.  
  6.    To use - highlight a FRAMESTORE or VIDEO STILL.  Then run this ARexx routine.  It will allow you to set a timing for this and every still that follows.  Place a STOP icon in your project to limit this routine. */
  7.  
  8.  
  9. call remlib('PROJECT_REXX_PORT')
  10. call addlib('PROJECT_REXX_PORT',0)
  11.  
  12.  
  13. start_loc=croutonspot()
  14. project_end=croutonsinproject()
  15. current_spot=start_loc
  16.  
  17. /* make sure we're on an STILL or FRAME & get duration */
  18. call croutonpick(current_spot)
  19.  
  20. /* --- wait for any screen update delay --- */
  21. call time('R')
  22. do while (time('E')<0.5)
  23.     end
  24.  
  25. call req_open("Set Frame Times - by Aussie","---------------------------","Sets STILLs & FRAMES to the same duration.","From selected clip to STOP icon, or end.")
  26.  
  27. if (croutontype()~="FRAM") & (croutontype()~="STIL") then do
  28.    call req_tell("<< Canceled >>","Select STILL/FRAME before starting")
  29.    call req_close()
  30.    call quit()
  31.    end
  32.  
  33. f_numfields=croutongettag(duration)
  34. f_numframes=(f_numfields%2)
  35.  
  36. f_want=req_time("Set duration",f_numframes)
  37. if f_want="CANCEL" then do
  38.    call req_close()
  39.    call quit()
  40.    end
  41.  
  42.  
  43.  
  44.  
  45. fm=substr(f_want,4,2)
  46. fs=substr(f_want,7,2)
  47. ff=substr(f_want,10,2)
  48. f_all=((fm*1800)+(fs*30)+ff)*2
  49.  
  50. /* --- check for 2 field length to eliminate video jitter --- */
  51. if f_all//4~=0 then do
  52.    f_all=f_all+2
  53.    fm=f_all%3600
  54.    fs=(f_all-(fm*3600))%60
  55.    ff=(f_all-(fm*3600)-(fs*60))%2
  56.    f_want="00:"||right(fm,2,0)||":"||right(fs,2,0)||":"||right(ff,2,0)
  57.    call req_tell("Odd length causes jitters","      So OZ adds 1 more frame")
  58.    end
  59.  
  60. if f_all<2 then do
  61.    call req_tell("<< Canceled >>" ,"      Zero length is too small")
  62.    call req_close()
  63.    call quit()
  64.    end
  65.  
  66. /* Proceed or not */
  67. test=req_tell("Duration of " f_want ,"      Set stills to this duration?")
  68. call req_close()
  69. if test=0 then call quit()
  70.  
  71. /* f_numfields=(test*2) */
  72. call croutonsettag(duration,f_all)
  73.  
  74.  
  75. do while (current_spot<project_end)
  76.    current_spot=current_spot+1
  77.    call croutonpick(current_spot)
  78.    if (croutontype()="FRAM") | (croutontype()="STIL") then call croutonsettag(duration,f_all)
  79.    if croutontype()="CTRL" then do
  80.       test=croutonname()
  81.       test1=right(test,length(test)-lastpos("/",test))
  82.       if (upper(test1)="STOP") then do
  83.          call projectupdate()
  84.          call croutonpick(start_loc)
  85.          call req_error(" OZ:  Performed till STOP icon!  <<< Stills have new matching times >>>") 
  86.          call quit2()
  87.          end
  88.       end
  89.  
  90.    end
  91.  
  92. call projectupdate()
  93. call croutonpick(start_loc)
  94. call req_error(" OZ:    All Done    <<< Stills have new matching times  >>>")
  95. call quit2()
  96.  
  97.  
  98.  
  99. quit:
  100. call croutonpick(start_loc)
  101. call req_error(" OZ:    <<< Last Operation Canceled >>>")
  102.  
  103. quit2:
  104. call remlib("PROJECT_REXX_PORT")
  105.  
  106. exit
  107.